package com.jqh.openglesdemo.muti;

import android.content.Context;
import android.util.AttributeSet;

import com.jqh.openglesdemo.jqhopengl.GLSurfaceView;
import com.jqh.openglesdemo.shader.JqhGLTextureView;

public class JqhMutiSurfaceView extends GLSurfaceView {

    private JqhMutiRender jqhMutiRender;
    public JqhMutiSurfaceView(Context context) {
        this(context, null);
    }

    public JqhMutiSurfaceView(Context context, AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public JqhMutiSurfaceView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);

        jqhMutiRender = new JqhMutiRender(context);
        setRender(jqhMutiRender);
    }

    public void setTextureId(int textrueId, int fragmentShaderId) {
        if (jqhMutiRender == null) return;
        jqhMutiRender.setTextureId(textrueId, fragmentShaderId);
    }
}
